package com.extr.service;

import java.util.HashMap;
import java.util.List;

import com.extr.controller.domain.QuestionQueryResult;
import com.extr.domain.exam.HomeWork;
import com.extr.domain.exam.HomeWorkHistory;
import com.extr.domain.question.QuestionStruts;
import com.extr.util.Page;

public interface HomeWorkService {
	
	public void createHomeWork(
			HashMap<Integer, HashMap<Integer, List<QuestionStruts>>> questionMap,
			HashMap<Integer, Integer> questionTypeNum,
			HashMap<Integer, Float> questionTypePoint,
			HashMap<Integer, Float> knowledgePointRate, HomeWork homeWork);

	public void insertHomeWork(HomeWork homeWork);

	public List<HomeWork> getHomeWorkList(Page<HomeWork> pageModel);

	public HomeWork getHomeWorkById(int homeworkid);

	public List<QuestionQueryResult> getQuestionDescribeListByIdList(
			List<Integer> idList);

	public void updateHomeWork(HomeWork homework);

	public void deleteHomeWork(Integer homeWorkId);

	public List<HomeWork> getIndexHomeWorkList();

	public HomeWorkHistory getUserHomeWorkHistoryByUserIdAndHomeWorkId(int userId, int homeWorkId);

	public void addUserHomeWorkHistory(HomeWorkHistory homeWorkHistory);

	public HomeWorkHistory getUserHomeWorkHistoryByHistId(
			int homework_history_id);

	public void updateHomeWorkHistory(HomeWorkHistory homeWorkHistory);

	public List<HomeWorkHistory> getHomeWorkHistByHomeWorkId(int homeWorkId, Page<HomeWorkHistory> pageModel);

	public void updateHomeWorkHistoryOfTeacher(HomeWorkHistory homeWorkHistory);

	public List<HomeWorkHistory> getHomeWorkHistByUserId(int userid,
			Page<HomeWorkHistory> pageModel);
}
